package com.rttmall.shopbackend;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ImportResource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@ServletComponentScan//设置启动时spring能够扫描到我们自己编写的servlet和filter, 用于Druid监控
@SpringBootApplication
@ImportResource(locations={"classpath:kaptcha.xml"})
//@EnableTransactionManagement//开启事务
public class ShopbackendApplication extends SpringBootServletInitializer  {
	@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(ShopbackendApplication.class);
    }
	public static void main(String[] args) {
		SpringApplication.run(ShopbackendApplication.class, args);
	}
}
